import pandas as pd

def format(df):
    def format_func(column):
        df[column] = df[column] * 100
        df.rename(columns={column: 'volume'}, inplace=True)
    
    formats = {}
    formats['trade_date'] = lambda column: pd.to_datetime(df[column])
    formats['vol'] = format_func
    formats['amount'] = lambda column: df[column] * 10000
    
    for key, value in formats.items():
        print(f'{key} : {value}')
        result = value(key)
        
        if result is not None:
            df[key] = result
    
    return df.sort_values(by=['ts_code','trade_date'], ascending=[True, True])
